package cn.lili.modules.grab.dingdong.reps.goods;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DetailRespose {

    @ApiModelProperty("商品信息")
    private Goods goods;

    @ApiModelProperty("商品规格信息")
    private List<Specs> specs;

    @ApiModelProperty("规格名称集合")
    private Map<String,String> specs_name;

    @ApiModelProperty("规格详情集合")
    private Map<String, Map<String,DetailRespose.SpecsList>> specs_list;

    @ApiModelProperty("图片集合")
    private List<Images> images;

    /**
     * 商品信息
     */
    @Data
    public static class Goods {

        @ApiModelProperty("包邮数量")
        private String free_shipping_num;

        @ApiModelProperty("商品ID")
        private String goods_id;

        @ApiModelProperty("商品名称")
        private String goods_name;

        @ApiModelProperty("默认图片")
        private String default_image;

        @ApiModelProperty("第一规格名称")
        private String spec_name_1;

        @ApiModelProperty("第二规格名称")
        private String spec_name_2;

        @ApiModelProperty("第三规格名称")
        private String spec_name_3;

        @ApiModelProperty("第四规格名称")
        private String spec_name_4;

        @ApiModelProperty("第一分类ID")
        private String cate_id_1;

        @ApiModelProperty("第二分类ID")
        private String cate_id_2;

        @ApiModelProperty("默认规格ID")
        private String default_spec;

        @ApiModelProperty("体积")
        private String volume;

        @ApiModelProperty("重量")
        private String weight;

        @ApiModelProperty("供货商的id")
        private String supply_id;

        @ApiModelProperty("添加时间")
        private String add_time;

        @ApiModelProperty("包邮量 (0不包邮 其他数值：最低购买数量不小于此值，包邮)")
        private String baoyou_num_wl;

        @ApiModelProperty("是否上架")
        private String if_b2b;

        @ApiModelProperty("是否可售 已废弃")
        private String if_show;

        @ApiModelProperty("0可售，1禁售")
        private String closed;

        @ApiModelProperty("品牌ID")
        private String brand_id;

        @ApiModelProperty("样品采购起订量（最小购买数量，小于此数量无法进行下单）")
        private String sampling_num;

        @ApiModelProperty("总库存")
        private String stock;

        @ApiModelProperty("供货商名称")
        private String supply_name;

        @ApiModelProperty("商品详情")
        private String description;
    }

    /**
     * 商品规格信息
     */
    @Data
    public static class Specs {
        @ApiModelProperty("规格ID")
        private String spec_id;

        @ApiModelProperty("打包数（倍数单位）")
        private String package_num;

        @ApiModelProperty("供货价 (单位分)")
        private String price;

        @ApiModelProperty("建议零售价 (单位分)")
        private String retail_price;

        @ApiModelProperty("规格1名称")
        private String spec_1;

        @ApiModelProperty("规格2名称")
        private String spec_2;

        @ApiModelProperty("规格3名称")
        private String spec_3;

        @ApiModelProperty("规格4名称")
        private String spec_4;

        @ApiModelProperty("商品ID")
        private String goods_id;

        @ApiModelProperty("已废弃")
        private String moq;

        @ApiModelProperty("规格组合名称")
        private String spec_name;

        @ApiModelProperty("库存")
        private String stock;
    }

    @Data
    public static class SpecsList {

        @ApiModelProperty("规格ID")
        private String spec_id;

        @ApiModelProperty("打包数量")
        private String package_num;

        @ApiModelProperty("规格价格 (单位分)")
        private String price;

        @ApiModelProperty("建议零售价 (单位分)")
        private String retail_price;

        @ApiModelProperty("规格名称")
        private String spec_1;

        @ApiModelProperty("规格名称二")
        private String spec_2;

        @ApiModelProperty("规格名称三")
        private String spec_3;

        @ApiModelProperty("规格名称四")
        private String spec_4;

        @ApiModelProperty("商品ID")
        private String goods_id;

        @ApiModelProperty("已废弃")
        private String moq;

        @ApiModelProperty("规格组合值")
        private String spec_name;

        @ApiModelProperty("规格库存")
        private String stock;

        @ApiModelProperty("规格ID集合")
        private String ids;
    }

    @Data
    public static class Images {
        @ApiModelProperty("图片ID")
        private String image_id;

        @ApiModelProperty("图片地址")
        private String image_url;
    }
}
